package com.sumainfor.pc.dev.controller;

import com.sumainfor.common.util.JsonResult;
import com.sumainfor.pc.dev.service.QuestionMapperService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

@Controller
@RequestMapping("/tenant/kty/QuestionController")
public class QuestionController {

    @Autowired
    QuestionMapperService questionMapperService;

    /**
     * 查询密保问题
     * @return
     */
    @ResponseBody
    @RequestMapping("/getquestion")
    public JsonResult getquestion(){

        return  questionMapperService.getquestion();
    }

    /**
     * 查询系统消息id
     * @return
     */
    @ResponseBody
    //@RequestMapping("/getMesId")
    @GetMapping("/getMesId")
    public JsonResult getMesId(@RequestParam Map<String,Object> params){
        return  questionMapperService.getMesId(params);
    }

    /**
     * 查询系统消息列表
     * @param params
     * @return
     */
    @ResponseBody
    @PostMapping("/getMessageById")
    public JsonResult getMessageById(@RequestBody List<Map<String, Object>> params){

        return  questionMapperService.getMessageById(params);
    }


    /**
     * 查询系统消息内容
     * @param params
     * @return
     */
    @ResponseBody
    @RequestMapping("/getMessageinfoById")
    public JsonResult getMessageinfoById(@RequestParam Map<String, Object> params){

        return  questionMapperService.getMessageinfoById(params);
    }
}
